jQuery(document).ready(function() {
	//创建JQGRID表格
	
	var grid = $("#table1").ligerGrid({
        columns: [
                  { display: '请款单据', name: 'procode', width: 200 },
                  { display: '采购编号', name: 'aktscode', width: 180 },
                  { display: '采购入库号', name: 'oricode', width: 150},
                  { display: '损益仓库', name: 'whname', width: 120 },
                  { display: '单据类型', name: 'djlx', width: 110 ,
                	  render: function (item){
                		  var djlx=item.djlx;
                		  if(djlx=="1"){
                			  return "入库";
                		  }
                		  if(djlx=="2"){
                			  return "出库";
                		  } 
                  }},
                  { display: '损益类型', name: 'bslx', width: 110 },
                  { display: '入库日期', name: 'rkrq', width: 120,
                	  render: function (item){
                		  var cdate=new Date(item.rkrq);
                		  return formatDate(cdate,"yyyy-MM-dd")
                	  }},
                  { display: '备注', name: 'remark', width: 120 }
                      ],  usePager: true,pageSize:30,
                      url : basic_Url+"/list.do",
                      width: "100%", height:"98%", checkbox: false,      
                      onDblClickRow : function (data, rowindex, rowobj){
                    	  edit(data);
                       }
                  });
	$("#pageloading").hide();
});

